package mustry.alone.utils.common;

import java.io.UnsupportedEncodingException;
import java.net.URLDecoder;

import com.alibaba.druid.util.StringUtils;

public class PublicTools {
	public static String decode(String url,String charset){
		if(StringUtils.isEmpty(url)){
			return "";
		}
		
		if(StringUtils.isEmpty(charset)){
			charset = "UTF-8";
		}
		
		String decodeUrl = "";
		try {
			decodeUrl = URLDecoder.decode(url,charset);
		} catch (UnsupportedEncodingException e) {
			e.printStackTrace();
		}
		return decodeUrl;
	}
}
